#ifndef UContainerWindowH
#define UContainerWindowH
#include "stdafx.h"
#include "UDockable.h" //needed for inheritence

class TContainerWindow: public TDockable
{
private:

protected:
	int ActiveChildindex;
	virtual void MouseMove	(int X, int Y, int mstate)=0;
	virtual void MouseDown	(int X, int Y, uint8 button);
	virtual void MouseUp	(int X, int Y, uint8 button);
	virtual void KeyDown	(SDL_KeyboardEvent* Key);
	virtual void KeyUp	(SDL_KeyboardEvent* Key);
public:
	std::vector<TDockable*> Children;
	virtual TDockable* FindWindowByTag(int Tag);
	TDockable* ActiveChild();

	TContainerWindow(TRectangle Rect, TContainerWindow* parent, TWindowThemer *wt, std::string name);

	virtual bool Dock(TDockable* WindowToDock, int X, int Y);

	virtual void EventHandle(SDL_Event event);
	virtual void AddChild	(TDockable* Child);
	virtual void RemoveChild(TDockable* Child);
	virtual void MouseLeave();

	virtual void setActiveChild(int Child);
	virtual void SetPos		(TRectangle Rect);
};
#endif
